<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp"%>
<%@ include file="/base/database.jsp"%>
	<%
			String leaveID=request.getParameter("leaveID");
			
			Connection conn=getConn();
			
			String sql="select * from sys_leave where leaveID=?";
			
			PreparedStatement pstmt=conn.prepareStatement(sql);
			
			pstmt.setString(1,leaveID);
			
			ResultSet rs=pstmt.executeQuery();
			
			String rs_leaveID="";
			String rs_courseID="";
			String rs_reason="";
			String rs_daynum="";
			String rs_stuNo="";
			String rs_applytime="";
			String rs_status="";
			String rs_audittime="";
			String rs_opinion="";
			
			
			while(rs.next()){
				
				rs_leaveID=rs.getString("leaveID");
				rs_courseID=rs.getString("courseID");
				rs_reason=rs.getString("reason");
				rs_daynum=rs.getString("daynum");
				rs_stuNo=rs.getString("stuNo");
				rs_applytime=rs.getString("applytime");
				rs_status=rs.getString("status");
				rs_audittime=rs.getString("audittime");
				rs_opinion=rs.getString("opinion");
				

				if(rs_status!=null){
					String name="";
				if("0".equals(rs_status)){
					name="待审核";
				}
				else if("1".equals(rs_status)){
					name="同意";
				}
				else if("2".equals(rs_status)){
					name="不同意";
					}
				}
			}	
	 %>
	 
<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta name="renderer" content="webkit">
	<title>学生申请的请假信息</title>
	<link rel="stylesheet" href="css/pintuer.css">
	<link rel="stylesheet" href="css/admin.css">
	<link rel="shortcut icon" href="images/logo.jpg">
	<script src="js/jquery.js"></script>
	<script src="js/pintuer.js"></script>
	<script type="text/javascript">
		function ch(){
			alert("已审核成功!");
		}
	</script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>编辑学生个人信息</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="page/instructor/leave/action_editleave.jsp">  
      <div class="form-group">
        <div class="label">
          <label>请假编号：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50"  value="<%=rs_leaveID %>" readonly="readonly" name="leaveID" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
       <div class="form-group">
        <div class="label">
          <label>课程编号：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_courseID %>" name="courseID" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
 		<div class="form-group">
        <div class="label">
          <label>请假事由：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_reason %>" name="reason" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
      	<div class="form-group">
        <div class="label">
          <label>天数：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_daynum %>" name="daynum" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
      	<div class="form-group">
        <div class="label">
          <label>学号：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_stuNo %>" name="stuNo" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
            	<div class="form-group">
        <div class="label">
          <label>请假时间：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_applytime %>" name="applytime" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>
      
        <div class="form-group">
        <div class="label">
          <label>审核时间：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_audittime %>" name="audittime" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
        </div>
         <div class="form-group">
        <div class="label">
          <label>审核意见：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<%=rs_opinion %>" name="opinion" data-validate="required:数据必填项" />
          <div class="tips"></div>
        </div>
      </div>  
        
        
        <div>
                   <select name="status" id="status">
                   <option>选择审核状态</option>
                   <option value="0" <% if("0".equals(rs_status)){ %> selected="selected"><%} %>>待审核</option>
                   <option value="1"  <% if("1".equals(rs_status)){ %> selected="selected"><%}%> >同意</option>
                   <option value="2"  <% if("2".equals(rs_status)){ %> selected="selected"><%}%> >不同意</option>
                   </select>
        </div><br/>
       
       	<div class="field">
          <button class="button bg-main icon-check-square-o" type="submit" onclick="ch()">确定</button></div>
    </form>
  </div>
</div>
</body>
</html>
